<!DOCTYPE html>
<body>
  <video controls autoplay></video>
  <portal src="media-capture-portal.html"></portal>
  <script>
    async function start() {
      let stream = await navigator.mediaDevices.getUserMedia({video: true});
      let video = document.querySelector('video');
      video.srcObject = new MediaStream(stream.getVideoTracks());
    };

    function activate() {
      let portal = document.querySelector('portal');
      portal.activate();
    }
  </script>
</body>
